/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package prehilife;

import java.awt.Frame;

/**
 *
 * @author Piotr
 */
public class Entrance extends javax.swing.JDialog {
    Frame parent;
    public int sizeGrid;
    public int mam;
    public int mem;
    public int cave;
    public int hut;
    public int hp;
    public int coll;
    public int turn;
    public int type;
    public int typeAff;
    public boolean auto;
    /**
     * Creates new form Entrance
     */
//    public Entrance(Frame parent, boolean modal) {
//        super(parent, modal);
//        super();
//        initComponents();
//        this.parent=parent;
//    }
    public Entrance(boolean modal) {
        //super(parent, modal);
        super();
        initComponents();
        //this.parent=parent;
    }
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        supportPanel = new javax.swing.JPanel();
        prehiPanel = new javax.swing.JPanel();
        imagePrehi = new javax.swing.JLabel();
        buttonPrehi = new javax.swing.JButton();
        dinoPanel = new javax.swing.JPanel();
        imageDino = new javax.swing.JLabel();
        buttonDino = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        supportPanel.setLayout(new java.awt.GridLayout(1, 2));

        prehiPanel.setBackground(new java.awt.Color(0, 0, 0));
        prehiPanel.setLayout(new java.awt.BorderLayout());

        imagePrehi.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/PrehiLifeLauncher.png"))); // NOI18N
        imagePrehi.setText("jLabel1");
        prehiPanel.add(imagePrehi, java.awt.BorderLayout.CENTER);

        buttonPrehi.setText("Launch PrehiLife");
        buttonPrehi.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonPrehiActionPerformed(evt);
            }
        });
        prehiPanel.add(buttonPrehi, java.awt.BorderLayout.PAGE_END);

        supportPanel.add(prehiPanel);

        dinoPanel.setBackground(new java.awt.Color(255, 255, 255));
        dinoPanel.setLayout(new java.awt.BorderLayout());

        imageDino.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/dinoLifeLauncher.png"))); // NOI18N
        dinoPanel.add(imageDino, java.awt.BorderLayout.CENTER);

        buttonDino.setText("Launch DinoLife");
        buttonDino.setEnabled(false);
        dinoPanel.add(buttonDino, java.awt.BorderLayout.PAGE_END);

        supportPanel.add(dinoPanel);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(supportPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 789, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(supportPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 604, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void buttonPrehiActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonPrehiActionPerformed
//        PrehiOptionsChooser options = new PrehiOptionsChooser(parent, true);
        PrehiOptionsChooser options = new PrehiOptionsChooser(true);
        options.setVisible(true);
        sizeGrid=options.getSizeGrid();
        mam=options.getMam();
        mem=options.getMem();
        cave=options.getCave();
        hut=options.getHut();
        hp=options.getHp();
        coll=options.getColl();
        turn=options.getTurn();
        type=options.getTypeapp();
        typeAff=options.getTypeAff();
        auto=options.getAuto();
        setVisible(false);
        
    }//GEN-LAST:event_buttonPrehiActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton buttonDino;
    private javax.swing.JButton buttonPrehi;
    private javax.swing.JPanel dinoPanel;
    private javax.swing.JLabel imageDino;
    private javax.swing.JLabel imagePrehi;
    private javax.swing.JPanel prehiPanel;
    private javax.swing.JPanel supportPanel;
    // End of variables declaration//GEN-END:variables
}
